﻿namespace AC.ExtendedRenderer.Toolkit.Charting
{
    using System;
    using System.ComponentModel;
    using System.Drawing;

    public class HBarData
    {
        protected System.Drawing.Color colorBar;
        protected double dValue;
        protected RectangleF rectBar;
        protected string strLabel;

        public HBarData()
        {
            Random random = new Random();
            this.colorBar = System.Drawing.Color.FromArgb(random.Next(0xffffff));
            this.dValue = 0.0;
            this.strLabel = string.Empty;
        }

        public HBarData(double dValue, string strLabel, System.Drawing.Color colorBar)
        {
            this.dValue = dValue;
            this.strLabel = strLabel;
            this.colorBar = colorBar;
            Random random = new Random();
            colorBar = System.Drawing.Color.FromArgb(random.Next(0xffffff));
            dValue = 0.0;
            strLabel = string.Empty;
        }

        public RectangleF BarRect
        {
            get
            {
                return this.rectBar;
            }
            set
            {
                this.rectBar = value;
            }
        }

        public System.Drawing.Color Color
        {
            get
            {
                return this.colorBar;
            }
            set
            {
                this.colorBar = value;
            }
        }

        [Localizable(true)]
        public string Label
        {
            get
            {
                return this.strLabel;
            }
            set
            {
                this.strLabel = value;
            }
        }

        public double Value
        {
            get
            {
                return this.dValue;
            }
            set
            {
                this.dValue = value;
            }
        }
    }
}

